<template>
	<view>
		<uni-search-bar :radius="100" v-model="sousuo.title"   @confirm="onloadFeedback(sousuo)" class="searchTitle"></uni-search-bar>
				<uni-card :title="item.title" :extra="item.feedbackTime"  @click="feedDetail(item.id)" v-for="item in feedbackHistorys" :key="item.id">
						<text class="uni-body text">{{item.content}}</text>
				</uni-card>
		
	</view>
</template>

<script>
	import {feedbackHistory} from '@/until1/api1.js'
    import user from '../../../store/modules/user'
	export default {
		data() {
			return {
				feedbackHistorys:[],
				sousuo:{
					username:'',
				    title:''
				},
				id:0
			}
		},
	   onLoad(){
		   this.sousuo.username = uni.getStorageSync("username")
		   this.onloadFeedback(this.sousuo)
		},
		methods: {
		   async onloadFeedback(data){
			   let r1=await feedbackHistory(data)
			   console.log(r1);
			   this.feedbackHistorys=r1.data
		   },
		   // 跳转到反馈详情页面
		   feedDetail(id){
			   uni.navigateTo({
			    	url:`/pages/mine/feedDetail/feedDetail?&id=${id}` 
			   })
		   }
		   
		}
	}
</script>

<style>
.list{
	 width:730rpx;
	 height:220rpx;
	 margin:30rpx auto;
	 border-radius: 50rpx;
	 background-color: #fff;
	 padding:25rpx 55rpx;
	 line-height: 45rpx;
	 box-sizing: border-box;
	 box-shadow: 2rpx 2rpx 10rpx rgba(0, 0, 0, 0.3);
	 border: none;
 }
 .text {
	height: 60rpx;
   display: -webkit-box;
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 2;
   overflow: hidden;
   text-overflow: ellipsis;
 }
</style>
 